home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Entertainment Pack
/
SoftKey Entertainment Pack (Games and Multimedia)(SoftKey Multimedia)(NEW844AE-CD2)(1996).ISO
/
programs
/
dosgames
/
arcade
/
corwp20
/
relay.rpp
< prev
next >
Wrap
Text File
|
1991-03-25
|
2KB
|
57 lines
;-------------------------------------------------------;
; RELAY - NO-PCT Version
;
; distributes fixed number of processes at regular
; spacing, restores child process if damaged,
; otherwise bombs interval
; -> extremely regenerative
; 11/5/90 Stefan Strack
;-------------------------------------------------------;
rem ------- This file has to be preprocessed by RPP
rem ------- Equates --------------------
rem change the next line for a different distance between program copies
equ spacing 1000
equ gobomb (binit last -)
equ bombinit (last bomb - bombincr +)
equ bomconts 0
equ bombincr 4
equ bombcount (spacing 24 - bombincr /)
rem
rem ------- Dummy data for labels
rem ------- In front to prevent subversion by IMP
source: nop
destin: nop
lcounter: nop
bcounter: nop
bombaddr: nop
choicep: nop
rem
rem ------- If program ahead is founder, do not copy, else
rem ------- Set up pointers for copy
first: cmp #gobomb choicep
jmp binit
begin: mov #(last copy - 1 +) source
mov #(last copy - 1 + spacing +) destin
mov #(last first - 1 +) lcounter
rem
rem ------- Copy program ahead 1000
copy: mov \source \destin
djn copy lcounter
rem
rem ------- Start subprocess at new copy
spl (first spacing +)
rem ------- Inform parent of "no error"
binit: mov #gobomb (choicep spacing -)
rem ------- Reset choice to "error occurred"
mov #(begin last -) choicep
rem
rem ------- Bomb space between here and child
mov #bombinit bombaddr
mov #bombcount bcounter
bomb: mov #bomconts ^bombaddr
add #bombincr bombaddr
djn bomb bcounter
rem ------- Done, child has not acknowledged: goto begin (copy)
rem ------- Child reported "no error": goto binit
last: jmp ^choicep